<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <%@include file="../assets/public.jsp"%>
    <title>我的收藏</title>

</head>
<body>
<%@include file="../assets/header.jsp"%>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
    <%@include file="../assets/sidebar.jsp"%>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">我收藏的文章</h2>
            </div>
        </div>

        <section class="no-padding-bottom">

            <div class="list-group myList">
                <!--搜索文章的条件-->
                <div class="myTitle">
                    <form class="form-inline" action="${pageContext.request.contextPath}/user/article_collect">
                        <div class="form-group">
                            <label for="inlineFormInput" class="sr-only">Name</label>
                            <input id="inlineFormInput" name="collect_title" type="text" placeholder="按标题名字查找" class="mr-sm-3 form-control">
                        </div>
                        <div class="form-group">
                            <input type="submit" value="查询" class="btn btn-primary">
                        </div>
                    </form>

                    <!--<input id = "addArt" type="submit" value="发布文章" class="btn btn-primary">-->

                </div>

                <ul>
                    <c:forEach var="colArticle" items="${sessionScope.collectPageEntity.data}">
                        <li class="list-group-item">
                            <div style="float: right;">
                                <span><strong>收藏数：</strong>100</span>
                                <span>&nbsp;</span>
                                <span>&nbsp;</span>
                                <span>&nbsp;</span>
                                <span><strong>浏览数：</strong>${colArticle.browseCount}</span>
                            </div>
                            <a href="${pageContext.request.contextPath}/article/article_detail?articleId=${colArticle.id}">${colArticle.title}</a>
                            <p class="h6"><strong>作者：</strong>${colArticle.publishRealName}</p>
                            <p class="h6"><strong>时间：</strong>${colArticle.publishDate}</p>
                            <p style="white-space:nowrap;overflow:hidden;text-overflow: ellipsis">${colArticle.content}</p>
                        </li>
                    </c:forEach>

                </ul>

                <nav class="text-center" aria-label="Page navigation">
                    <ul class="pagination">
                        <li>
                            <a href="${pageContext.request.contextPath}/user/colArt_back" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <c:forEach begin="${sessionScope.collectPageEntity.begin}" end="${sessionScope.collectPageEntity.end}" var="p" step="1">
                            <c:if test="${p==sessionScope.collectPageEntity.currPage}">
                                <li><a class="nav-active" href="${pageContext.request.contextPath}/user/article_collect?colCurrPage=${p}">${p}</a></li>
                            </c:if>
                            <c:if test="${p!=sessionScope.collectPageEntity.currPage}">
                                <li><a  href="${pageContext.request.contextPath}/user/article_collect?colCurrPage=${p}">${p}</a></li>
                            </c:if>
                        </c:forEach>
                        <li>
                            <a href="${pageContext.request.contextPath}/user/colArt_next" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </section>

        <%@include file="../assets/footer.jsp"%>
    </div>
</div>

</body>
</html>